package com.lxmes.procontrol.mapper;

import java.math.BigDecimal;
import java.util.List;
import com.lxmes.procontrol.domain.NcProOrderInfoBg;
import com.lxmes.procontrol.domain.NcProOrderInfoBgVo;
import org.apache.ibatis.annotations.Param;

/**
 * 产线工位报工单Mapper接口
 *
 * @author 张志煜
 * @date 2022-12-30
 */
public interface NcProOrderInfoBgMapper
{
    /**
     * 查询产线工位报工单
     *
     * @param id 产线工位报工单主键
     * @return 产线工位报工单
     */
    public NcProOrderInfoBg selectNcProOrderInfoBgById(Long id);
    public List<NcProOrderInfoBgVo> selectBgInfoCount(@Param("startTime") String startTime, @Param("endTime") String endTime);

    /**
     * 查询产线工位报工单列表
     *
     * @param ncProOrderInfoBg 产线工位报工单
     * @return 产线工位报工单集合
     */
    public List<NcProOrderInfoBg> selectNcProOrderInfoBgList(NcProOrderInfoBg ncProOrderInfoBg);
    //统计总报工数量
    public BigDecimal countBgNum(NcProOrderInfoBg ncProOrderInfoBg);
    /**
     * 新增产线工位报工单
     *
     * @param ncProOrderInfoBg 产线工位报工单
     * @return 结果
     */
    public int insertNcProOrderInfoBg(NcProOrderInfoBg ncProOrderInfoBg);

    /**
     * 修改产线工位报工单
     *
     * @param ncProOrderInfoBg 产线工位报工单
     * @return 结果
     */
    public int updateNcProOrderInfoBg(NcProOrderInfoBg ncProOrderInfoBg);

    /**
     * 删除产线工位报工单
     *
     * @param id 产线工位报工单主键
     * @return 结果
     */
    public int deleteNcProOrderInfoBgById(Long id);

    /**
     * 批量删除产线工位报工单
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteNcProOrderInfoBgByIds(Long[] ids);

    //获取今天的code编码
    public String getNewCode(String newDate);
}
